package com.github.pig.training.mapper;

import com.github.pig.common.util.Query;
import com.github.pig.training.entity.TrainingStudent;
import com.baomidou.mybatisplus.mapper.BaseMapper;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 学员信息 Mapper 接口
 * </p>
 *
 * @author andrew
 * @since 2018-06-16
 */
public interface TrainingStudentMapper extends BaseMapper<TrainingStudent> {

    /**
     * 修改跟进学员
     * @param map
     * @return
     */
    int sFollowUp(Map map);

    /**
     * 修改学生状态
     * @param map
     * @return
     */
    int updState(Map map);
    /**
     *
     * 定时检查跟进天数是否大于最大天数
     *
     */
    public List<TrainingStudent> checkDayNum(Integer dayNum);

    /**
     * 条件分页查询学生
     * @param query
     * @param userId
     * @return
     */
    List selectStudentByCondition(Query query, @org.apache.ibatis.annotations.Param("userId") int userId,
                                  @org.apache.ibatis.annotations.Param("condition")String condition);

    /**
     * 跟进人次查询学员
     * @param number
     * @return
     */
    List<TrainingStudent> getStudentByFlowupFrequency(@org.apache.ibatis.annotations.Param("number") int number,
                                     @org.apache.ibatis.annotations.Param("condition")String condition,
                                      @org.apache.ibatis.annotations.Param("begin")int begin,
                                      @org.apache.ibatis.annotations.Param("end")int end);
}
